Median based estimation of database query responses

ABSTRACT

A computer system may include a processor and a memory coupled thereto. The memory may include a database. The processor may be configured to randomly split the database into sub-databases and applying a database query to the sub-databases. The processor may also be configured to generate respective estimated query response values for each sub-database based upon applying the database query, calculate a median of the estimated query response values, and generate a probability distribution based upon the estimated query response values and the calculated median. The processor may further be configured to select a final estimated query response value based upon the probability distribution.

STATEMENT REGARDING PRIOR DISCLOSURES BY THE INVENTORS

The following disclosure is submitted under 35 U.S.C. § 102(b)(1)(A): “Generalization for Adaptively-chosen Estimators via Stable Median”; Vitaly Feldman, Thomas Steinke; Proceedings of Machine Learning Research vol 65:1-30, Jun. 20, 2017.

BACKGROUND

The present invention relates to computer systems, and more specifically, to database querying and related methods.

A database that includes data points selected randomly from a larger population may be queried for a pattern. The pattern, however, may not fully generalize the entire population or data points in the database, but instead, may occur by chance.

Modern data analysis may be considered an iterative process in which multiple algorithms are run on the same data points, often in an adaptive fashion. The algorithms used in each step of the iterative process may depend on the results from previous steps. Human decisions may also introduce additional, implicit dependencies between the data and the algorithms being run. In contrast, theoretical analysis in machine learning and statistical inference generally focuses on fixed and pre-specified algorithms run on “fresh” data.

SUMMARY

A computer system may include a processor and a memory coupled thereto. The memory may include a database. The processor may be configured to randomly split the database into a plurality of sub-databases, and apply a database query to the plurality of sub-databases. The processor may also be configured to generate a plurality of respective estimated query response values for each sub-database based upon applying the database query, calculate a median of the estimated query response values, generate a probability distribution based upon the estimated query response values and the calculated median, and select a final estimated query response value based upon the probability distribution.

The processor may be configured to generate the probability distribution by at least weighting the plurality of estimated query response values based upon proximity to the calculated median. The processor may be configured to select the final estimated query response by at least selecting one of the weighted plurality of respective estimated query response values based upon the weighting as the final estimated query response, for example.

The processor may be configured to generate the probability distribution by at least sampling each of the plurality of estimated query response values based upon e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|) wherein ϵ is a predetermined parameter, a_(v) is a number of the estimated query response values greater than the selected estimated query response value, and b_(v) is a number of the estimated query response values less than the selected estimated query response value.

Each of the plurality of estimated query response values may be sampled from a set of possible query response values proportional to e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|), for example.

The processor may be configured to determine ϵ according to

${\epsilon = \frac{{\log_{e}{T}} + 6}{m}},$ wherein T is a set of possible query response values. The processor may be configured to generate the probability distribution so that the probability distribution at any point is given by

$\frac{P}{e^{{- \epsilon}\; l}}$ wherein P is the probability distribution, and l is a number of points between a given estimated query response value and the median, for example. The database may include a medical database of patient medical data. The database may include a machine learning database, for example.

Another aspect is directed to a computer-implemented method for estimating a response to a database query. The method may include randomly splitting the database into a plurality of sub-databases, applying a database query to the plurality of sub-databases, and generating a plurality of respective estimated query response values for each sub-database based upon applying the database query. The method may also include calculating a median of the estimated query response values and generating a probability distribution based upon the estimated query response values and the calculated median. The method may further include selecting a final estimated query response value based upon the probability distribution.

Another aspect is directed to a computer-readable medium for estimating a response to a database query. The computer-readable medium may include computer-executable instructions that when executed by a processor cause the processor to perform operations that may include randomly splitting the database into a plurality of sub-databases, applying a database query to the plurality of sub-databases, and generating a plurality of respective estimated query response values for each sub-database based upon applying the database query. The operations may also include calculating a median of the estimated query response values, generating a probability distribution based upon the estimated query response values and the calculated median, and selecting a final estimated query response value based upon the probability distribution.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram of a computer system according to an embodiment.

FIG. 2 is a flow diagram of operation of the computer system of FIG. 1.

DETAILED DESCRIPTION

Referring initially to FIG. 1 and the flowchart 40 in FIG. 2, a computer system 20 for estimating queries includes a memory 21 and a processor 22 coupled to the memory. The memory 21 includes a database 23, which may include, for example, medical data.

Beginning at Block 42, the processor 22 randomly splits the database 23 into smaller sub-databases 24 a-24 n (Block 44). More particularly, the database 23 (“Database 5”), as an input that includes n samples, is split into sub-databases 24 a-24 n that includes subsamples S₁, S₂, . . . , S_(m) each including t samples. Random disjoint subsets may be chosen so that

$m = {\left\lfloor \frac{n}{t} \right\rfloor.}$

The processor 22 applies a database query ϕ to the sub-databases 24 a-24 n and generates respective estimated query response values for each sub-database based upon applying the database query (Blocks 46 a-46 m). The processor 22 calculates a median of the estimated query response values and generates a probability distribution based upon the estimated query response values and the calculated median. The processor 22 may generate the probability distribution by at least weighting the estimated query response values based upon proximity to the calculated median.

The processor 22 selects a final estimated query response value based upon the probability distribution. The processor 22 may select the final estimated query response value based upon the weighting. In other words, the processor 22 aggregated the estimated query response values and the answer v is chosen from T randomly according to how close it is to the median of the value, as will be explained in further detail below (Block 48) before ending at Block 50.

More particularly, the processor 22, for each query ϕ and response range T performs the following:

-   -   a. Evaluates the query ϕ on each of the subsamples to obtain         values v₁=ϕ(S₁), v₂=ϕ(S₂) . . . , v_(m)=ϕ(S_(m)) (Blocks 46 a,         46 b, . . . 46 m);     -   b. Selects a value v from T randomly according to a weighting         that prioritizes values close to the median of obtained values:         v₁, v₂, . . . , v_(m). (Block 48). One technique for this         selection includes sampling each v from T based upon, for         example, proportional to, e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|). Here ϵ         is a predetermined parameter selected prior to selecting the         value v. In some embodiments, ϵ may be set according to,

${\epsilon = \frac{{\log_{e}{T}} + 6}{m}},$

-   -    wherein a_(v) is the number of values v₁, v₂, . . . , v_(m)         that are greater than v (i.e., v_(i)>v), and b_(v) is the number         of values v₁, v₂, . . . , v_(m) that are less than v (i.e.,         v_(i)<v); and     -   c. Returns the randomly sampled value v as the answer to the         query ϕ.

The processor 22, according to the algorithm it is executing, also sets the set T of possible response values, which is provided as an input along with the query to the algorithm. The set can be specified explicitly or given as a range of values[A, B] with step size z. Thus, T={A, A+z, A+2z, . . . , B−z,B}. If z is not given then the preferred value is set as z=(B−A)/t. As described above, the representative value v is chosen from the set T.

As will be appreciated by those skilled in the art, the system advantageously answers multiple queries in a manner that responses are increasingly accurate even when each query is chosen in a way that depends on the answers returned for previous queries. The computer system 20 may thus answer arbitrary numerical (real-valued) queries.

In contrast to the computer system 20, prior art approaches for answering queries may include running each query on the whole database once and using the value, running each query on a single random subset of the dataset and using the value, and running each query on several random subsets and using the median of the values. However, all of these approaches are known to produce answers that have a relatively low accuracy for the population on common sequences of queries that depend on each other. For example, in a binary classification problem, a standard sequence of queries arises as follows: (i) Use queries to find variables that are noticeably positively correlated with the label (e.g. more than two standard deviations larger than 0); (ii) Build a classifier that takes a majority vote of the selected positively correlated variables; and (iii) Use a further query to estimate the accuracy of this classifier. This classifier will often predict the label on the database much better than on the population. Therefore the final query that measures the accuracy of this classifier cannot be accurately answered by simply evaluating the query on the whole database and using that value. One prior art approach that addresses risks to accuracy that arise from dependencies between the queries is a different algorithm that evaluates the numerical query once and then adds a randomly chosen value to it. This algorithm is only known to provide accurate responses to certain types of queries (namely those whose value has low numerical sensitivity to each data point) and has a fixed level of accuracy. In contrast, the computer system 20 provides increased accuracy responses to arbitrary numerical queries and exploits the variability of the value of the query on the database.

1. Detailed System And Algorithm

Further details of the computer system 20 will now be described. The computer system 20 of the present embodiments demonstrates that a relatively straightforward algorithm may provide increasingly accurate answers to adaptively-chosen queries corresponding to arbitrary real-valued estimators. Specifically, let ϕ:X^(t)→

be an arbitrary estimator, where the expectation E_(z)˜p^(t)[ø(Z)] is equal (in which case the estimator is referred to as unbiased) or sufficiently close to some parameter or value of interest. The number of samples t that ϕ uses corresponds to the desired estimation accuracy (naturally, larger values of t allow more accurate estimators). The present algorithm estimates the expectation E_(z)˜p^(t)[ø(Z)] to within (roughly) the standard deviation of ϕ(Z)—i.e. τ≈sd(ø(p^(t)))=√{square root over (Var_(z˜p) _(t) [ø(Z)])}—or, more generally, to within the interquartile range of the distribution of ϕ on fresh data (i.e. the distribution of ϕ(Z) for Z˜

^(t), which is denoted by ϕ(

^(t))). If

${\phi(s)} = {\frac{1}{t}{\sum\limits_{i = 1}^{t}{\psi\left( s_{i} \right)}}}$ for a function ψ:X→[−1,1], then the error roughly scales as τ≈sd(ψ(

))/√{square root over (t)}. This gives a natural interpretation of t as an accuracy parameter.

In contrast, given a comparable number of samples, existing algorithms for statistical queries give an estimate with accuracy roughly τ≈√{square root over (1/t)} regardless of the variance of the query. This is not just an artifact of existing analysis since, to ensure the desired level of differential privacy, this algorithm adds noise whose standard deviation scales as √{square root over (1/t)}. For a statistical query, ψ:X→[−1,1], the standard deviation of ψ(

) is upper bounded by 1, but is often much smaller. For example, when estimating the accuracy of a binary classifier with (low) error p the present algorithm will give an estimate with accuracy that scales as √{square root over (p/t)}, rather than √{square root over (1/t)}.

The algorithm implemented by the system 20 will now be described more formally starting with a relatively simple case of statistical queries. Given a statistical query ψ:X→[−1,1] and t fresh random i.i.d. samples ZϵX^(t) drawn from

, the empirical mean estimator

${\phi(Z)}\overset{.}{=}{\frac{1}{t}{\sum\limits_{i \in {\lbrack t\rbrack}}^{\;}{\psi\left( Z_{i} \right)}}}$ is an unbiased estimator of E_(X˜p)[ψ(X)], with a standard deviation equal to sd(ψ(P))/√{square root over (t)}. Applied to such estimators, the algorithm answers adaptively-chosen statistical queries with accuracy that scales as sd(ψ(

))/√{square root over (t)}.

Theorem 1.1: For all ζ>0, tϵ

, β>0, kϵ

, and n≥n₀=O(t√{square root over (k log(1/β))} log(k/βζ), there exists an efficient algorithm M that, given n samples from an unknown distribution p, provides answers v₁, . . . , v_(k)ϵ[−1,1] to an adaptively-chosen sequence of queries ψ₁, . . . , ψ_(k):X→[−1,1] and satisfies:

${\Pr\limits_{{S\sim\mathcal{P}^{n}}{M{(S)}}}\left\lbrack {\forall{j \in {{\lbrack k\rbrack{{v_{j} - {\underset{X\sim\mathcal{P}}{E}\left\lbrack {\psi_{j}(X)} \right\rbrack}}}} \leq {{2 \cdot \frac{{sd}\left( {\psi_{j}(\mathcal{P})} \right)}{\sqrt{t}}} + \zeta}}}} \right\rbrack} \geq {1 - {\beta.}}$

Note that the present algorithm also has an additional ζ precision term. The dependence of sample complexity on 1/ζ is logarithmic and can be further improved using more involved algorithms. Thus the precision term, ζ, like the failure probability β, can be made negligibly small at little cost. Prior technique give an error bound of √{square root over (1/t)}, which is at least as large (up to constant factors) as the bound sd(ψ_(j)(

))/√{square root over (t)}+ζ, when ζ≤1/t. For comparison, in the non-adaptive setting the same error may be obtained using n=O(t log(k/β)) samples (with ζ=1/t).

Note that, for simplicity, in Theorem 1.1 the range of each query is normalized to [−1,1]. However this normalization affects only the precision term ζ. In particular, for queries whose range is in an interval of length at most b, the number of samples desired for the result to get precision ζ scales logarithmically in b/ζ. In contrast, the sample complexity of previous results scales quadratically in b. Further, a more refined statement discussed below allows handling queries with arbitrary range.

For general real-valued estimators of the form ϕ:X^(t)→[−1,1], the algorithm gives the following: (For simplicity it is assumed that t is fixed for all the queries.)

Theorem 1.2 For all ζ>0, tϵ

, β>0, kϵ

, and n≥n₀=O(t√{square root over (k log(1/β))} log(k/βζ)), there exists an efficient algorithm M that, given n samples from an unknown distribution

, provides answers v₁, . . . , v_(k)ϵ[−1,1] to an adaptively-chosen sequence of queries ϕ₁, . . . , ϕ_(k):X^(t)→[−1,1] and satisfies:

${\Pr\limits_{{S\sim\mathcal{P}^{n}}{M{(S)}}}\left\lbrack {\forall{j \in {{\lbrack k\rbrack{{v_{j} - {\underset{Z\sim\mathcal{P}^{t}}{E}\left\lbrack {\phi_{j}(Z)} \right\rbrack}}}} \leq {{2 \cdot {{sd}\left( {\phi_{j}\left( \mathcal{P}^{t} \right)} \right)}} + \zeta}}}} \right\rbrack} \geq {1 - {\beta.}}$ For general estimators, prior technique given accuracy or accuracy guarantees in terms of the worst-case sensitivity. More formally, for ϕ:X^(n)→

, let Δ(ϕ) denote the worst-case sensitivity of ϕ—that is, Δ(ϕ)=max_(z,z′),ϕ(z)−ϕ(z′), where the maximum is over z, z′ϵX^(n) that differ in a single element. Prior techniques and analysis show that for k adaptively-chosen queries ϕ₁, . . . , ϕ_(k), each query ϕ_(i), can be answered with accuracy

$\sqrt{n \cdot \sqrt{k}} \cdot {\Delta\left( \phi_{i} \right)}$ (ignoring logarithmic factors and the dependence on the confidence β). This setting is somewhat more general than the seeing in the present algorithm, since each query is applied to the entire dataset available to the algorithm, whereas with respect to the present setting, each query is applied to fixed-size sub-samples of the dataset. This means that in this setting, the space of estimators that can be applied to data is richer than the present space of estimators and might allow better estimation of some underlying quantity of interest. At the same time, the present techniques give better accuracy guarantees for finding the expectation of each estimator.

To see the difference between the present setting and that in prior approaches, consider estimation of the lowest expected loss of a function from a family

, namely L*≅

[L(f, X)], where L:

×X→[−R, R] is some loss function. Given a dataset s of size n, the standard ERM estimator is defined as

${\phi_{n}(s)}\overset{.}{=}{\min_{f \in \mathcal{F}}{\frac{1}{n}{\sum\limits_{i \in {\lbrack n\rbrack}}^{\;}{{L\left( {f,s_{i}} \right)}.}}}}$ Using uniform convergence results, one can often obtain that |L*−

[ϕ_(n)(S)]|=O(d/√{square root over (n)}), for some d that measures the capacity of

and also depends on L. The sensitivity of the estimator ϕ_(n) is upper bounded by 2R/n. Thus prior art algorithms give an estimate of

[ϕ_(n) (S)] within (roughly)

$R \cdot \sqrt{\frac{\sqrt{k}}{n}}$ and an upper bound on the total error will scale as (d+R·k^(1/4))/√{square root over (n)}. In the present setting, the estimator ϕ_(t) will be used, where t scales as n/√{square root over (k)}. The bias of this estimator is |L*−

[ϕ_(t)(S)]|=O (d/√{square root over (t)})=O(d·k^(1/4)/√{square root over (n)}). At the same time

[ϕ_(t)(S)] can be estimated within (roughly) the standard deviation of ϕ_(t). The standard deviation of ϕ_(t) is typically always upper bounded by 2R·√{square root over (t)}=R·k^(1/4)/√{square root over (n)}, but is often much smaller. Hence, depending on the setting of the parameters and the distribution

, the present approach described herein gives an error bound that is either higher by a factor of k^(1/4) or lower by a factor of R/d than the prior art approaches. In other words, the prior art approaches and the present approach provide incomparable guarantees for this problem.

Both Theorem 1.2 and Theorem 1.1 are corollaries of the following more general result. Define qi

(a,b)≐{vϵ

:

[Y≤v]>a∧

[Y<v]<b to be the (a, b)-quantile interval of the distribution

. The (¼,¾)-quantile interval is referred to as the interquartile interval.

Theorem 1.3:

For all T⊂

with |T|<∞, tϵ

, β>0, kϵ

, and n≥n₀=O(t√{square root over (k log(1/β))} log(|T|k/β)), there exists an efficient algorithm M that, given n samples from an unknown distribution

, provides answers v₁, . . . , v_(k)ϵT to an adaptively-chosen sequence of queries ϕ₁, . . . , ϕ_(k):X^(t)→T and satisfies:

${\Pr\limits_{{S\sim\mathcal{P}^{n}}{M{(S)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{P}^{t})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} \geq {1 - {\beta.}}$

Two remarks may be made about the guarantee of the theorem:

Accuracy in Terms of Interquartile Interval:

The accuracy guarantee of Theorem 1.3 is that each returned answer lies in the (¼,¾)-quantile interval of the distribution of the query function on fresh data (i.e. the distribution ϕ(

^(t))). The length of this interval is referred to as the interquartile range. This guarantee may appear strange at first sight, but it is actually a strengthening of Theorem 1.2 by Chebyshev's inequality, the interquartile interval of any distribution

lies within two standard deviations of the mean:

${{qi}_{\mathcal{D}}\left( {\frac{1}{4},\frac{3}{4}} \right)} \subseteq {\left\lbrack {{{\underset{Y\sim\mathcal{D}}{E}\lbrack Y\rbrack} - {2 \cdot {{sd}(\mathcal{D})}}},{{\underset{Y\sim\mathcal{D}}{E}\lbrack Y\rbrack} - {2 \cdot {{sd}(\mathcal{D})}}}} \right\rbrack.}$

However, the interquartile interval may be significantly smaller if

is heavy-tailed. If, for example, the distribution

has infinite variance, then the present guarantee is still useful, whereas bounds in terms of standard deviation will be meaningless. This formulation does not even assume that the quantity of interest is the expectation of ϕ(

^(t)) (or even that this expectation exists). In fact, ϕ could be a biased estimator of some other parameter of interest.

Intuitively, this accuracy guarantee may be interpreted as follows. If it is know that a sample from ϕ(

^(t)) is an acceptable answer with probability at least ¾, and the set of acceptable answers forms an interval, then with high probability the answer returned by the present algorithm is acceptable. The constants ¼ and ¾ are, of course, arbitrary. More generally, v_(j)ϵ

(a, b) for any 0≤a<b≤1 may be demanded. However, this reduction increases the sample complexity n₀ by a factor of 1/(b−a)².

Finite Range T:

Theorem 1.3 assumes that the queries have a finite range. This is necessary for the present algorithm, as the required number of samples grows with the size of T, albeit slowly. Using a more involved algorithm, it may be possible to improve the dependence on the size of T from O(log|T|) to 2^(O(log*|T|)), where log* denotes the iterated logarithm—an extremely slow-growing function. To obtain Theorem 1.2 from Theorem 1.3, T is set to be the discretization of [−1,1] with granularity and round the output of ϕ:X^(t)→[−1,1] to the nearest point in T; this introduces the additive error ζ. However, allowing T to be arbitrary provides further flexibility. For example, T could be a grid on a logarithmic scale, yielding a multiplicative, rather than additive, accuracy guarantee. Furthermore, in some settings the range of the query is naturally finite and the scale-free guarantee of Theorem 1.3 comes at no additional cost. It should also be noted that, in general, the present result allows a different T_(j) to be chosen (adaptively) for each query ϕ_(j) as long as the size of each T_(j) is upper-bounded by some fixed value.

Another advantage of this formulation is that it removes the dependence on the entire range of ϕ: If it is known that the interquartile interval of ϕ(

^(t)) lies in some interval [a, b], the output range of ϕ to [a, b] may be truncated (and then discretize if desired). This operation does not affect the interquartile interval of ϕ(

^(t)), and hence does not affect the guarantees of the present algorithm. In particular, this means that in Theorem 1.2 the range of each ϕ is bounded in [−1,1] does not need to be assumed; it is sufficient to assume that the interquartile interval of ϕ(

^(t)) lies in [−1,1] to obtain the same guarantee. For example, if it is known beforehand that the mean of ϕ(

^(t)) lies in [−1,1], and its standard deviation is at most 1, then the range of ϕ may be truncated to [−3,3].

Verification Queries:

Queries that ask for “verification” of a given estimate of the expectation of a given estimator will not be considered—each query is specified by a function ϕ:X^(t)→

and a value (or “guess”) vϵ

. The task of the present algorithm is to check whether or not vϵ

(ρ,1−ρ) for some ρ chosen in advance. Such queries are used in a reusable holdout setting and in the EffectiveRounds algorithm that uses fresh subset of samples when a verification query fails. Provided is an algorithm for answering adaptively-chosen verification queries with the following guarantees.

Theorem 1.4 For all α, β, ρϵ(0,1/4) with α<ρ and t, l, k, nϵ

with

${{n \geq n_{0}} = {O\left( \frac{t\sqrt{{\ell log}\left( \frac{1}{\alpha\beta} \right)}{\log\left( \frac{k}{\beta} \right)}\rho}{\alpha^{2}} \right)}},$ there exists an efficient algorithm M that, given n samples from an unknown distribution

, provides answers to an adaptively-chosen sequence of queries (ϕ₁, v₁), . . . , (ϕ_(k), v_(k)) (where ϕ_(j):X^(t)→

and v_(j)ϵ

for all jϵ[k]) and satisfies the following with probability at least 1−β: for all jϵ[k]

-   -   If v_(j)ϵ         (ρ,1−ρ), then the algorithm outputs “Yes”.     -   If v_(j)∈         (ρ−α,1−ρ+α) the algorithm outputs “No”.

If neither of these two cases applies, the algorithm may output either “Yes” or “No.”

However, once the algorithm outputs “No” in response to l queries, it stops providing answers.

To answer the l queries that do not pass the verification step the present algorithm may be used for answering queries in Theorem 1.3 (with k there set to l here).

Answering Many Queries:

Finally, described herein is an (inefficient) algorithm that requires a dataset whose size scales as log k at the expense of an additional √{square root over (t log|X|)} factor.

Theorem 1.5

For all T⊂

with |T|<∞, tϵ

, β>0, kϵ

, and

${{n \geq n_{0}} = {O\left( {t^{\frac{3}{2}} \cdot \sqrt{\log{\mathcal{X}}{\log\left( \frac{1}{\beta} \right)}} \cdot {\log\left( \frac{k\;\log{T}}{\beta} \right)}} \right)}},$ there exists an algorithm M that, given n samples from an unknown distribution

supported on X, provides answers v₁, . . . , v_(k)ϵT to an adaptively-chosen sequence of queries ϕ₁, . . . ϕ_(k):X^(t)→T and satisfies

${\Pr\limits_{{S\sim\mathcal{P}^{n}}{M{(S)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{P}^{i})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} \geq {1 - {\beta.}}$

It should be noted that when applied to low-sensitivity queries with t=1/τ², this algorithm improves dependence on |X| and τ from n=Õ(log(|X|)/τ⁴) in prior art techniques to n=Õ(√{square root over (log|X|)}/τ³) (although, as pointed out above, the setting in the prior art technique is not always comparable to the present setting).

Techniques

Similar to prior techniques, the present embodiments rely on properties of differential privacy. Differential privacy is a stability property of an algorithm, namely it requires that replacing any element in the input dataset results in a small change in the output distribution of the algorithm. As a result, a function output by a differentially private algorithm on a given dataset generalizes to the underlying distribution. Specifically, if a differentially private algorithm is run on a dataset drawn i.i.d from any distribution and the algorithm outputs a low-sensitivity function, then the empirical value of that function on the input dataset is close to the expectation of that function on a fresh dataset drawn from the same distribution.

The second relatively important property of differential privacy is that it composes adaptively: running several differentially private algorithms on the same dataset still satisfies differential privacy (with somewhat worse parameters) even if each algorithm depends on the output of all the previous algorithms. This property makes it possible to answer adaptively-chosen queries with differential privacy and a number of algorithms have been developed for answering different types of queries. The generalization property of differential privacy then implies that such algorithms can be used to provide answers to adaptively-chosen queries while ensuring generalization.

For each query, the algorithm of Theorem 1.3 first splits its input, including n samples, into m=n/t disjoint subsamples of size t, and computes the estimator ϕ:X^(t)→

on each. It then outputs an approximate median of the resulting values in a differentially private manner. Here an approximate median is any value that falling between the (1−α)/2-quantile and the (1+α)/2-quantile of the m computed values (for some approximation parameter α). In addition to making the resulting estimator more stable, this step also amplifies the probability of success of the estimator. For comparison, prior art algorithms compute the estimator once on the whole sample and then output the value in a differentially private manner.

It is thus shown that differential privacy ensures that an approximate empirical median with high probability falls within the true interquartile interval of the estimator on the input distribution. Here, the known strong connection between differential privacy and generalization is relied upon. However, the present embodiments rely on stability to replace of any one of the m subsamples (including t points) used to evaluate the estimator, whereas previous analyses used the stability under replacement of any one out of the n data points. The use of this stronger condition is crucial for bypassing the limitations of previous techniques while achieving improved accuracy guarantees.

A number of differentially-private algorithms for approximating the empirical median of values in a dataset have been studied in the literature. One common approach to this problem is the use of local sensitivity. This approach focuses on additive approximation guarantees and requires stronger assumptions on the data distribution to obtain explicit bounds on the approximation error.

In the present embodiments, a data-dependent notion of approximation to the median is relied upon in which the goal is to output any value v between the (1−α)/2-quantile and the (1+α)/2-quantile of the empirical distribution for some approximation parameter α. It may thus be easy to see that this version is essentially equivalent to the interior point problem in which the goal is to output a value between the smallest and largest values in the dataset. A prior art technique recently showed that the optimal sample complexity of privately finding an interior point in a range of values T lies between m=2^((1+o(1))log*|T|) and m=Ω(log*|T|), where log* is iterated logarithm or inverse tower function satisfying log*(2^(x))=1+log*(x).

The prior art algorithm is relatively complex and, therefore, a simple and efficient algorithm is used herein that is based on an exponential mechanism, and is similar to an algorithm to estimate quantiles of a distribution. This algorithm has sample complexity m=O(log|T|) (for constant α>0). In addition, for the present algorithm that answers many queries another simple algorithm is used based on approximate binary search, which can yield sample complexity m=O(√{square root over (log|T|)}); it has the advantage that it reduces the problem to a sequence of statistical queries. It is generally known that the exponential mechanism and binary search can be used to privately find an approximate median in the context of the applications described herein.

Now the second part of the proof: an approximate empirical median is also in the interquartile interval of the distribution. i.e., any value in the empirical (⅜,⅝)-quantile interval falls in the distribution's (¼,¾)-quantile interval. A value vϵT is an approximate empirical median if the empirical cumulative distribution function at v is close to ½ that is, cdf_(S)(v)≐Pr_(Y˜S)[Y≤v]≈½, where S˜

^(n) is the random samples and Y˜S denotes picking a sample from S randomly and uniformly. Note that cdf_(S)(v) is the empirical mean of a statistical query over S, whereas the true cumulative distribution function

(v)≐

[Y≤v] is the true mean of the same statistical query. Hence, the known strong connection between differential privacy and generalization for statistical queries can be applied to obtain that

(v)≈cdf_(S)(v). This ensures

(v)≈½ and hence v falls in qi_(D)(¼,¾) (with high probability).

For estimators that produce an accurate response with high probability (such as any well-concentrated estimator) a different, substantially simpler way to prove high probability bounds on the accuracy of the whole adaptive procedure is provided. This allows bypassing the known proofs of high-probability bounds that rely on relatively involved arguments.

The present algorithm for answering verification queries (Theorem 1.4), is obtained by reducing the verification step to verification of two statistical queries for which the domain of the function is X^(t) and the expectation is estimated relative to

^(t). To further improve the sample complexity, it is observed that it is possible to calibrate the algorithm for verifying statistical queries from to introduce less noise when ρ is small. This improvement relies on sharper analysis of the known generalization properties of differential privacy that has already found some additional uses.

The present algorithm for answering many queries (Theorem 1.5) is also obtained by a reduction to statistical queries over X^(t). In this case statistical queries are used to find a value in the interquartile interval of the estimator via a binary search.

Finally, the differentially private algorithms that are used to answer queries might also be of interest for applications in private data analysis. These algorithms demonstrate that meaningful privacy and error guarantees can be achieved without any assumptions on the sensitivity of estimators. From this point of view, the present approach is an instance of subsample-and-aggregate technique of a prior art technique, where the approximate median algorithm is used for aggregation. It is noted that a prior technique used a somewhat related approach that also takes advantage of the concentration of the estimator around its mean during the aggregation step. That algorithm first clips the tails of the estimator's distribution via a differentially private quantile estimation and then uses simple averaging with Laplace noise addition as the aggregation step. That analysis is specialized to estimators that are approximately normally distributed and hence the results are not directly comparable with the present more general setting.

2. Preliminaries

For kϵ

, it is denoted that [k]={1, 2, . . . , k} and a_([k]) is used as a shorthand for the k-tuple (a₁, a₂, . . . , a_(k)). For a condition E

(E) is used to denote the indicator function of E. Thus E[

(E)]=Pr[E].

For a randomized algorithm M Y˜M to denote that Y is random variable obtained by running M. For a distribution

, Y˜D is used to denote that Y is a random variable distributed according to

. For 0≤α≤β≤1 and a distribution

, it denoted by the (α, β)-quantile interval of

by

(α,β)≐{vϵ

:

[Y≤v]>α∧

[Y<v]<β}.

qi_(D)(¼,¾) is referred to as the interquartile interval of

and the length of this interval is the interquartile range. For sϵ

^(n) qi_(S)(α, β) is denoted by the empirical version of the quantity above, that is the (α, β)-quantile interval obtained by taking

to be the uniform distribution over the elements of s. In general, the datasets are viewed as being equivalent to a distribution, namely the uniform distribution on elements of that dataset.

For the present algorithms, a query is specified by a function ϕ:X^(t)→

. For notational simplicity,

=X^(t) and partition a dataset sϵX^(n) into m points s₁, . . . ,s_(m)ϵ

. Therefore throughout the discussion n=mt. For sϵ

^(m), ϕ(s)=(ϕ(s₁), . . . ,ϕ(s_(m))) is the transformed dataset. Similarly, for a distribution

on X,

=

^(t) is defined to be the corresponding distribution on

and ϕ(

) to be the distribution obtained by applying ϕ to a random sample from

. The expectations of these distributions are denoted

${s\lbrack\phi\rbrack} = {{\frac{1}{m}{\sum_{i \in {\lbrack m\rbrack}}{{\phi\left( s_{i} \right)}\mspace{14mu}{and}\mspace{14mu}{\mathcal{D}\lbrack\phi\rbrack}}}} = {{E_{Z\text{\textasciitilde}\mathcal{D}}\left\lbrack {\phi(Z)} \right\rbrack}.}}$

2.1 Adaptivity

A central topic described herein is the interaction between two algorithms A—the analyst—and M—the present query-answering algorithm. Let Q be the space of all possible queries and

be the set of all possible answers. In the present applications, Q will be a set of functions ϕ:Z→

, possibly with some additional parameters and

will be (a subset of)

. The notation for this interaction is thus:

-   -   Input sϵ         ^(m) is given to M.     -   For j=1, 2, . . . , k:     -   A computes a query q_(j)ϵQ and passes it to M     -   M produces answer a_(j)ϵ         and passes it to A     -   The output is the transcript (q₁q₂, . . . , q_(k), a₁, a₂, . . .         , a_(k))ϵQ^(k)×         ^(k)

Given interactive algorithms A and M, define A⇄M (s) to be function which produces a random transcript of the interaction between A and M, where s is the input given to M. Formally, the above specifies how A⇄M:X^(n)→Q^(k)×

^(k) is defined.

The transcript function A⇄M provides a “non-interactive view” of the output of an interactive process. The goal is thus to construct M such that, for all A, the output of A⇄M has the desired accuracy and stability properties.

2.2 Differential Privacy

Definition 2.1 (Differential Privacy) An algorithm M:

^(m)→

is (ε, δ)-differentially private if, for all datasets s, s′ϵ

^(m) that differ on a single element, ∀E⊆

Pr[M(s)ϵE]≤e ^(ε) Pr[M(s′)ϵE]+δ.

It should be noted that, throughout, an algorithm M:X^(n)→

is considered whereby

=X^(t) with n=mt so that M:

^(m)→

. Then the differential privacy is defined with respect to the latter view (that is, with respect to changing a whole tuple of t elements in the original view of M). This is a stronger condition.

However, Definition 2.1 only covers non-interactive algorithms. Thus, it can extended to interactive algorithms:

Definition 2.2 (Interactive Differential Privacy) An interactive algorithm M is (ε, δ)-differentially private if, for all interactive algorithms A, the (non-interactive) algorithm A⇄M:

^(m)→

is (ε, δ)-differentially private.

Theorem 2.3 (Post-processing) Let M:

^(m)→

be (ε, δ)-differentially private. Let F:

→

′ be an arbitrary randomized algorithm. Define M′:

^(m)→

′ by M′(s)=F(M(s)). Then M′ is also (ε, δ)-differentially private.

Post-processing may be considered relatively important as it allows performance of further computation on the output of a differentially private algorithm without breaking the privacy guarantee.

The key adaptive composition property of differential privacy is now stated, which bounds how rapidly differential privacy degrades under repeated use of the same dataset

Theorem 2.4 (Prior Adaptive Composition Technique): Fix kϵ

and ε₁, . . . , ε_(k), δ₁, . . . , δ_(k)>0. Let M₁, . . . , M_(k):

^(m)×

→

be randomized algorithms. Suppose that for all jϵ[k] and all fixed yϵ

, the randomized algorithm x

M_(j) (x, y) is (ε_(j), δ_(j))-differentially private. Define {circumflex over (M)}₁, . . . , {circumflex over (M)}_(k):

^(m)→

inductively by {circumflex over (M)}₁ (x)=M₁(x, y₀) where y₀ϵ

is fixed and {circumflex over (M)}_(i+1) (x)=M_(j+1)(x, {circumflex over (M)}_(j) (x)) for jϵ[k−1]. Then {circumflex over (M)}_(k) is ({circumflex over (ε)},{circumflex over (δ)})-differentially private for

${\hat{ɛ} = {{{\frac{1}{2}{\sum\limits_{j \in {\lbrack k\rbrack}}ɛ_{j}^{2}}} + {\sqrt{2{\log\left( \frac{1}{\delta^{\prime}} \right)}{\sum\limits_{j \in {\lbrack k\rbrack}}ɛ_{j}^{2}}}\mspace{14mu}{and}\mspace{14mu}\hat{\delta}}} = {\delta^{\prime} + {\sum\limits_{j \in {\lbrack k\rbrack}}\delta_{j}}}}},$ where δ′ϵ(0,1) is arbitrary.

The analyst that asks queries can be seen as a post-processing step on the output of a differentially private algorithm that answers the queries. Thus, by combining the adaptive composition and post-processing properties of differential privacy are obtained to ensure that an interactive algorithm is differentially private it is sufficient to ensure that each of the individual queries is answered with differential privacy.

Theorem 2.5: Fix kϵ

and ε, δ>0. Let M:

^(m)×Q→

be an algorithm, such that M(s, q) provides an answer to the query q using the dataset s and M is (ε, δ)-differentially private for every fixed sϵ

^(m). Define an interactive algorithm M^(⊕k) that takes as input sϵ

^(m) and answers k adaptively-chosen queries q₁, . . . , q_(k)ϵQ where, for each jϵ[k], M^(⊕k) produces an answer by independently running M(s, q_(j)). Then M^(⊕k) is (½kε²+ε√{square root over (2kln(1/δ′))}, δ′+kδ)-differentially private for all δ′ϵ(0,1).

3. Approximate Median

In this section, differentially private algorithms for outputting an approximate median of a real-valued dataset are presented. Namely, for sϵ

^(m), an α-approximate median of s is defined to be any element of the set

${{qi}_{s}\left( {\frac{1 - \alpha}{2},\frac{1 + \alpha}{2}} \right)}.$ In the present application, each real value is obtained by applying the given query function to a single subsample.

Several differentially private algorithms for computing an approximate median are known. All of these algorithms assume that the input elements and the range of the algorithm are restricted to some finite set T⊆

. They describe an (ε, δ)-differentially private algorithm which, on input sϵT^(m), outputs an α-approximate median of s as long as m≥(2+o(1))^(log*|T|)·O(log(1/εδ)/εα). Consider the problem of outputting an interior point which is equivalent to the definition of a 1-approximate median. However, by removing the elements of the dataset that are not in

${qi}_{s}\left( {\frac{1 - \alpha}{2},\frac{1 + \alpha}{2}} \right)$ α-approximate median reduces to the interior point problem.

Prior techniques also prove a nearly tight lower bound of m≥Ω(log*|T|) for α=ε=1 and δ= 1/100 m². This lower bound implies that privately outputting an approximate median is only possible if the data points are restricted to a finite range. It is noted that that for the stricter ε-differential privacy the sample complexity of this problem for constant α>0 is θ(log(|T|)/ε). Any differentially private algorithm for finding an approximate median can be used in the results. The prior art algorithm in is relatively involved and hence a relatively simple algorithm for the problem that relies on a “folklore” application of the exponential mechanism will be described.

Theorem 3.1: For all ε, α, β>0, finite T⊂

: and all m≥4 ln(|T|/β)εα, there exists an (ε, 0)-differentially private randomized algorithm M that given a dataset sϵ

^(m) and a query ϕ:

→T outputs an α-approximate median of ϕ(s)ϵT^(m) with probability at least 1−β. The running time of the algorithm is O(m·log|T|).

Proof: The algorithm is an instantiation of the exponential mechanism with the utility function c:T→

defined as c _(ϕ(s))(v)≐max{|{iϵ[m]:ϕ(s _(i))<v}|,|{iϵ[m]:ϕ(s _(i))>v}|}.

The algorithm outputs each vϵT with probability

${\text{Pr}\left\lbrack {{M\left( {s,\phi} \right)} = v} \right\rbrack} = {\frac{\exp\left( {\frac{- ɛ}{2}{c_{\phi{(s)}}(v)}} \right)}{\sum_{u \in T}{\exp\left( {\frac{- ɛ}{2}{c_{\phi{(s)}}(u)}} \right)}}.}$

Since c_(ϕ(s))(v) has sensitivity 1 as a function of s, this algorithm is (ε, 0)-differentially private (Theorem 3.1). Moreover, there is the accuracy guarantee (Corollary 3.12)

$\begin{matrix} {{\forall s},{{\beta\mspace{14mu}{\Pr\limits_{V\text{\textasciitilde}{M{({s,\phi})}}}\left\lbrack {{c_{\phi{(s)}}(V)} < {{OPT}_{\phi{(s)}} + \frac{2{\ln\left( {{T}/\beta} \right)}}{ɛ}}} \right\rbrack}} \geq {1 - \beta}},} & (1) \end{matrix}$ where OPT_(ϕ(s))⊥min_(uϵT)c_(ϕ(s))(u)≤m/2. Assuming the event in (1) happens for V=v (that is,

$\left. {{c_{\phi{(s)}}(v)} < {{OPT}_{\phi{(s)}} + \frac{2{\ln\left( {{T}/\beta} \right)}}{ɛ}}} \right),$ so that

${{\Pr\limits_{Y\text{\textasciitilde}{\phi{(s)}}}\left\lbrack {Y \leq v} \right\rbrack} = {{1 - {\frac{1}{m}{\left\{ {i \in {{\lbrack m\rbrack\text{:}{\phi\left( s_{i} \right)}} > v}} \right\} }}} > {\frac{1}{2} - \frac{2{\ln\left( {{T}/\beta} \right)}}{ɛm}} \geq \frac{1 - \alpha}{2}}},$ as long as α≥4 ln(|T|/β)/εm, which is equivalent to m≥4 ln(|T|/β)/εα. Similarly, the event in (1) implies that

${\Pr\limits_{Y\text{\textasciitilde}{\phi{(s)}}}\left\lbrack {Y < v} \right\rbrack} = {{\frac{1}{m}{\left\{ {i \in {{\lbrack m\rbrack\text{:}{\phi\left( s_{i} \right)}} < v}} \right\} }} < {\frac{1}{2} + \frac{2{\ln\left( {{T}/\beta} \right)}}{ɛ\; m}} \leq {\frac{1 + \alpha}{2}.}}$

Thus,

${\Pr\limits_{V\text{\textasciitilde}{M{({s,\phi})}}}\left\lbrack {V \in {{qi}_{\phi{(s)}}\left( {\frac{1 - \alpha}{2},\frac{1 + \alpha}{2}} \right)}} \right\rbrack} \geq {1 - \beta}$ as long as m≥4 ln(|T|/β)/εα.

To get an upper bound on the running time it is observed that using binary search, the elements of T can be split into m+1 “intervals” (that is contiguous subsets of T) with all elements of each interval having equal probability. This partition permits the computation of the normalization factor as well as the total probability of all the elements of T in each interval in O(m log|T|) time. A random point from the desired distribution can now be produced by first picking the interval proportionally to its probability and then outputting a point in that interval randomly and uniformly. (It is implicitly assumed that the structure of T is simple enough so that such operations can be performed in O(log|T|) time and ignore the time to evaluate ϕ on each of the elements of s.)

Another relatively simple and prior “folklore” algorithm will now be described finding an approximate median of a distribution that reduces the problem to O(log|T|) statistical queries. Recall, that an α-accurate response to a statistical query ψ:

→[−1,1] relative to distribution

over

is any value v such that |v−

[ψ]|≤α.

Lemma 3.2: For all α>0, finite T⊂

, a query ϕ:

→T and any distribution

over T, a value

$v \in {{qi}_{\phi{(\mathcal{D})}}\left( {\frac{1 - \alpha}{2},\frac{1 + \alpha}{2}} \right)}$ can be found using α/4-accurate responses to at most 2[log₂(|T|)] (adaptively-chosen) statistical queries relative to distribution

.

Proof: Using binary search, a point vϵT that satisfies the conditions p_(≤)(v)>½−α/4 and p_(<)(v)<½+α/4, where p_(≤)(v) (or p_(<)(v)) is the response to the statistical query ψ(z)=

(v≤ϕ(z))(ψ(z)=1(v<ϕ(z)), respectively). By the accuracy guarantees of the responses, |p_(≤)(v)−Pr_(Z˜)

[ϕ(Z)≤v]|≤α/4, and similarly for p_(<)(v). The next point is chosen to test depending on which of the conditions fails (It can be assumed that p_(<)(v)≤p_(≤)(v) so at most one condition can fail). Further, for the true median point of ϕ(

) (that is the point v*ϵT for which

[ϕ(Z)<v*]<½ and

[ϕ(Z)≤v*]≥½) both conditions will be satisfied by the accuracy guarantees. Finally, by the accuracy guarantees, any point v′ that satisfies both of these conditions is an α-approximate median for ϕ(

).

To find the α-approximate median of values ϕ(s)ϵT^(m) this reduction needs to be applied to the uniform distribution over the elements of ϕ(s). Answering statistical queries relative to this empirical distribution (commonly referred to as linear or counting queries) with differential privacy is a well-studied problem. For example, by using the standard Laplace or Gaussian noise addition algorithm one can obtain the following algorithm for finding an α-approximate median.

Corollary 3.3: For all ε, δ, α, βϵ(0,1/2), finite T⊂

and all

${{m \geq \frac{12\sqrt{2{\left\lceil {\log_{2}{T}} \right\rceil \cdot {\ln\left( \frac{1}{\delta} \right)} \cdot {\ln\left( \frac{2\left\lceil {\log_{2}{T}} \right\rceil}{\beta} \right)}}}}{ɛ\alpha}} = {O\left( \frac{\sqrt{\log{{T} \cdot {\log\left( \frac{1}{\delta} \right)} \cdot {\log\left( \frac{\log{T}}{\beta} \right)}}}}{ɛ\alpha} \right)}},$ there exists an (ε, δ)-differentially private randomized algorithm M that given sϵ

^(m) and ϕ:

→T outputs an α-approximate median of ϕ(s) with probability at least 1−β. The running time of the algorithm is O(m·log|T|).

4. Generalization from Differential Privacy

In this section two proofs are provided that differential privacy gives generalization guarantees for statistical queries. The first proof—which may be called a strong generalization—is most similar to previous work, whereas the second proof—which may be called simple generalization—is much simpler, but gives a weaker bound that may only be suitable for estimators that are well-concentrated.

4.1 Strong Generalization

Theorem 4.1 in this subsection shows that any differentially private algorithm generalizes with high probability, with a small blowup in the allowed generalization error. This proof closely follows that of prior technique, but is quantitatively sharper. This quantitative sharpening allows estimation of the probability that a given value v is outside of

(ρ,1−φ with higher accuracy (that scales with ρ as in the non-adaptive case). The sharper version in Section 5.1 is used; however, for results in this section ρ=¼ and therefore the bounds from prior art approaches suffice.

The mean absolute deviation of a distribution

over

is defined as mad(

)⊥

[|Y′−

[Y]|].

Theorem 4.1: Fix α, β, γϵ(0,1) and m, k ϵ

. Set ε=½ ln(1+γ) and δ=αβ/16. Suppose

$m \geq {\frac{8}{ɛ\alpha}{{\ln\left( {2{k/\beta}} \right)}.}}$ Let M:

^(m)→

_([0,1]) ^(k) be a (ε, δ)-differentially private algorithm with

_([0,1]) being the set of functions ϕ:

→[0,1]. Let

be a distribution on

. The

${\underset{\phi_{\lbrack k\rbrack} \sim {M{(S)}}}{\Pr\limits_{S \sim D^{m}}}\left\lbrack {\forall{j \in {{{\lbrack k\rbrack\mspace{14mu}{S\left\lbrack \phi_{j} \right\rbrack}} - {\mathcal{D}\left\lbrack \phi_{j} \right\rbrack}} \leq {\alpha + {\gamma \cdot {{mad}\left( {\phi_{j}(\mathcal{D})} \right)}}}}}} \right\rbrack} \geq {1 - {\beta.}}$

Note that, by Jensen's inequality, mad(ϕ(

))≤sd(ϕ(

)). Thus, Theorem 4.1 gives an error bound that scales with the standard deviation of the query (plus the absolute α term). Also, by the triangle inequality and the fact that ϕ(z)≥0 for all z, it holds that mad(ϕ(

))≤2·

[ϕ].

Thus Theorem 4.1 can also be interpreted as giving a multiplicative accuracy guarantee (plus the additive α). In comparison, the bound of prior techniques can be obtained (up to constants) by substituting the upper bound mad(ϕ(

))≤1 into Theorem 4.1. Thus, when mad(ϕ(

))<<1, the present bound is sharper.

As stated, Theorem 4.1 only applies in the non-adaptive setting and to statistical queries. However, this may be extended to prior monitoring techniques of and the cumulative probability function:

Theorem 4.2 Fix βϵ(0,1) and k,mϵ

with m≥2560 ln(2k/β). Let M be an ( 1/20, β/256)-differentially private interactive algorithm that takes as input sϵ

^(m) and provides answers v₁, . . . , v_(k)ϵ

to an adaptively-chosen sequence of queries ϕ₁, . . . , ϕ_(k):

→

. Suppose that, for all sϵ

^(m) and all interactive algorithms A,

$\begin{matrix} {{\Pr\limits_{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})}\text{\textasciitilde}A}\rightleftarrows{M{(S)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{{\phi j}{(s)}}\left( {\frac{3}{8},\frac{5}{8}} \right)}}} \right\rbrack} \geq {1 - {\beta.}}} & (3) \end{matrix}$

Then, for all distributions

and all interactive algorithm

${\Pr\limits_{\underset{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})}\text{\textasciitilde}A}\rightleftarrows{M{(S)}}}{S\text{\textasciitilde}\mathcal{D}^{m}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{{\phi j}{(\mathcal{D})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} \geq {1 - {2{\beta.}}}$

Proof: Let Q be the set of functions ϕ:

→

and let A be an arbitrary algorithm that asks queries in Q. Define f:Q^(k)×

^(k)→

_([0,1]) as follows, where

_([0,1]) is the set of functions ψ:

→[0,1]. Given (ϕ, v)ϵQ^(k)×

^(k), define ψ₁, ψ⁻¹, ψ₂, ψ⁻², . . . , ψ_(k), ψ_(−k):

→{0,1} by

ψ_(j)(x) ≐ (ϕ_(j)(x) ≤ v_(j))  and  ψ_(−j)(x) ≐ (ϕ_(j)(x) ≥ v_(j))  and  let ${f\left( {\phi,v} \right)} \doteq {\underset{\psi \in {\{{\psi_{1},\psi_{- 1},\psi_{2},\psi_{- 2},\ldots\mspace{14mu},\psi_{k},\psi_{- k}}\}}}{argmin}{{\mathcal{D}\lbrack\psi\rbrack}.}}$

By the post-processing property of differential privacy (Theorem 2.3), f (A⇄M (s)) is a (ε, δ)-differentially private algorithm (relative to its input sϵ

^(m)). Moreover, by assumption (3),

∀ s ∈ m ⁢ Pr ψ ∼ f ⁡ ( A ⇄ M ⁡ ( s ) ) ⁡ [ s ⁡ [ ψ ] ≥ 3 8 ] ≥ 1 - β .

However, by Theorem 4.1,

${\underset{\psi \sim {f{({A\rightleftarrows{M{(S)}}})}}}{\Pr\limits_{S \sim \mathcal{D}^{m}}}\left\lbrack {{{S\lbrack\psi\rbrack} - {\mathcal{D}\lbrack\psi\rbrack}} \leq \frac{1}{8}} \right\rbrack} \geq {\underset{\psi \sim {f{({A\rightleftarrows{M{(S)}}})}}}{\Pr\limits_{S \sim \mathcal{D}^{m}}}\left\lbrack {{{S\lbrack\psi\rbrack} - {\mathcal{D}\lbrack\psi\rbrack}} \leq {\frac{1}{16} + {\frac{1}{8} \cdot {{mad}\left( {\psi(\mathcal{D})} \right)}}}} \right\rbrack} \geq {1 - {\beta.}}$

Thus, by a union bound and the construction of f

${\underset{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S \sim \mathcal{D}^{m}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{D})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} = {{\underset{\psi \sim {f{({A\rightleftarrows{M{(S)}}})}}}{\Pr\limits_{S \sim \mathcal{D}^{m}}}\left\lbrack {{\mathcal{D}\lbrack\psi\rbrack} \geq \frac{1}{4}} \right\rbrack} \geq {1 - {2{\beta.}}}}$

Combining generalization (Theorem 4.2) with the present approximate median algorithm (Theorem 3.1) and composition (Theorem 2.4) yields the main result, Theorem 1.3. A somewhat more general statement that allows using different range T_(j) for every query ϕ_(j) is thus proven. The same generalization applies to other results, but this is not stated for brevity.

Theorem 4.3: For any βϵ(0,1), t,k,rϵ

and

=X^(t), and with

${n \geq n_{0}} = {O\left( {t{\sqrt{k\;{\log\left( \frac{1}{\beta} \right)}} \cdot {\log\left( \frac{kr}{\beta} \right)}}} \right)}$ there exists an interactive algorithm M that takes as input a dataset sϵX′ and provides answers v₁, . . . , v_(k)ϵ

to adaptively-chosen queries (T₁,ϕ₁), . . . , (T_(k), ϕ_(k)), where for all jϵ[k], |T_(j)|≤r and ϕ_(j):X^(t)→T_(j) with the following accuracy guarantee. For all interactive algorithms A and distributions

on X,

${\underset{{{({T_{\lbrack k\rbrack},\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S \sim \mathcal{P}^{n}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{P}^{t})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} \geq {1 - {\beta.}}$

Proof The algorithm M promised by Theorem 4.3 is described below.

-   -   Input SϵX^(mt).     -   Partition S into S₁, . . . , S_(m)ϵX^(t)     -   For j=1, 2, . . . , k:         -   Receive a set T_(j) and a query ϕ_(j):X^(t)→T_(j).         -   Run the ({tilde over (ε)}, 0)-differentially private             ¼-approximate median algorithm {tilde over (M)} from     -   Thm. 3.1 for T_(j) and with inputs (S₁, . . . , S_(m)) and ϕ_(j)         to obtain output v_(j)ϵT_(j).         -   Return answer v_(j).

Let

≐X^(t) and assume that for some r fixed in advance, r≥max_(jϵ[K])|T_(j)|. Theorem 3.1 says that if m≥4 ln(kr/β)/(α {tilde over (ε)}), then each execution of the median algorithm is ({tilde over (ε)}, 0)-differentially private and outputs an α-approximate median with probability at least 1−β/k. Here α=¼, so this rearranges to {tilde over (ε)}=16 ln(kr/β)/m. This implies that for all interactive algorithms A and every sϵ

^(m)

$\begin{matrix} {{\Pr\limits_{{{({T_{\lbrack k\rbrack},\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(d)}}\left( {\frac{3}{8},\frac{5}{8}} \right)}}} \right\rbrack} \geq {1 - {\beta.}}} & (4) \end{matrix}$

Interactive composition (Theorem 2.5 implies that M is (ε, δ)-differentially private for any δϵ(0,1) and

$\begin{matrix} {ɛ = {{\frac{k}{2}\left( \frac{16{\ln\left( {{kr}/\beta} \right)}}{m} \right)^{2}} + {\frac{16{\ln\left( {{kr}/\beta} \right)}}{m}{\sqrt{2k\;{\ln\left( {1/\delta} \right)}}.}}}} & (5) \end{matrix}$

By Theorem 4.2, if, in addition to (4), it is had that ε< 1/20 for δ=β/256 in (5) and m≥2560 ln(2k/β), then, for all distributions

,

≐

^(t) and all interactive algorithms A,

${{\underset{{{({T_{\lbrack k\rbrack},\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S \sim \mathcal{D}^{m}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{D})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack} \geq {1 - {2\beta}}},$ which is the desired conclusion.

It only remains to find the appropriate bound on the parameter m. m≥2560 ln(2k/β) and

${\frac{1}{20} \geq ɛ} = {{\frac{k}{2}\left( \frac{16{\ln\left( \frac{kr}{\beta} \right)}}{m} \right)^{2}} + {\frac{16{\ln\left( \frac{kr}{\beta} \right)}}{m}{\sqrt{2k\;{\ln\left( \frac{256}{\beta} \right)}}.}}}$

Setting m=640√{square root over (max{k, 16}·ln(256/β))}·ln(kr/β) achieves this.

A relatively simple corollary of Theorem 4.3 is now described that converts the (¼, ¾)-quantile interval guarantees to explicit additive error guarantees. The error will be measured in terms of the mean absolute deviation of the query ϕ on inputs sampled from

^(t) (eq. 2). For normalization purposes it is also assumed that queries are scaled by the analyst is such a way that both

^(t)[ϕ]ϵ[−1,1] and mad(ϕ(

^(t)))≤1. Note that this assumption is implied by ϕ having range [−1,1] and, in general, allows ϕ to have an infinite range.

Corollary 4.4: For tϵ

and a distribution

over X, let

denote the set of functions ϕ:X^(t)→

such that

^(t)[ϕ]ϵ[−1,1] and mad(ϕ(

^(t)))≤1. For all ζ>0, β>0, kϵ

, and n≥n₀=O(t√{square root over (k log(1/β))}·log(k/(ζβ))), there exists an efficient algorithm M which takes a dataset sϵX^(n) as an input and provides answers v₁, . . . , v_(k)ϵ

to an adaptively-chosen sequence of queries ϕ₁, . . . , ϕ_(k):X^(t)→

satisfying: for all interactive algorithms A and distributions

over X

${\underset{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S \sim \mathcal{P}^{m}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack{s.t.\mspace{14mu}\phi_{j}}} \in {\mathcal{F}_{\mathcal{P},t}:{{{v_{j} - {\mathcal{P}^{t}\left\lbrack \phi_{j} \right\rbrack}}} \leq {{4 \cdot \left( {\phi_{j}\left( \mathcal{P}^{t} \right)} \right)} + \zeta}}}}} \right\rbrack} \geq {1 - {\beta.}}$

Proof It should first be observed that by Markov's inequality, Pr _(Z˜)

_(t) [|ϕ(Z)−

^(t)[ϕ]|≥4·mad(ϕ(

^(t)))]≤¼.

Therefore,

${{qi}_{\phi{(\mathcal{P}^{t})}}\left( {\frac{1}{4},\frac{3}{4}} \right)} \subseteq {\left\lbrack {{{\mathcal{P}^{t}\lbrack\phi\rbrack} - {4 \cdot {{mad}\left( {\phi\left( \mathcal{P}^{t} \right)} \right)}}},{{\mathcal{P}^{t}\lbrack\phi\rbrack} + {4 \cdot {{mad}\left( {\phi\left( \mathcal{P}^{t} \right)} \right)}}}} \right\rbrack.}$

Hence for all jϵ[k] such that φ_(j)ϵ

(¼,¾)⊆[−5,5]. Now T is defined to be the interval [−5,5] discretized with step ζ, or T≐{r·ζ:rϵ

}∩[−5,5]. To answer a query ϕ_(j) define ϕ′_(j):X^(t)→T as ϕ′_(j)(z)=argmin_(vϵT)|v−ϕ′_(j)(z)| and then use the algorithm from Theorem 4.3 to answer the query ϕ′_(j). The projection of the values of ϕ to T simultaneously truncates the range to [−5,5] and discretizes it. The (¼,¾)-quantile interval of φ_(j)(

^(t)) is inside the interval [−5,5] and therefore is not affected by the truncation step. The discretization can affect this interval by at most ζ. Combining this with (6) it is obtained that if ϕ_(j)ϵ

then

${{qi}_{\phi^{\prime}{j{(\mathcal{P}^{t})}}}\left( {\frac{1}{4},\frac{3}{4}} \right)} \subseteq {\left\lbrack {{{\mathcal{P}^{t}\left\lbrack \phi_{j} \right\rbrack} - {4 \cdot {{mad}\left( {\phi_{j}\left( \mathcal{P}^{t} \right)} \right)}} - \zeta},{{\mathcal{P}^{t}\left\lbrack \phi_{j} \right\rbrack} + {4 \cdot {{mad}\left( {\phi_{j}\left( \mathcal{P}^{t} \right)} \right)}} + \zeta}} \right\rbrack.}$

Therefore the value v_(j) returned by the algorithm from Theorem 4.3 to query ϕ′_(j) satisfies: |v _(j)−

^(t)[ϕ_(j)]|≤4·mad(ϕ_(j)(

^(t)))+ζ.

Now to obtain the claimed bound on the sample complexity it is observed that |T|≤10/ζ.

Remark 1: Note that mean absolute deviation of ϕ is upper-bounded by the standard deviation of ϕ. Therefore Corollary 4.4 also holds with mad(ϕ_(j)(

^(t))) replaced by sd(ϕ_(j)(

^(t))) both in the definition of

and the accuracy bound (with the constant factor 4 being replaced by 2 since Chebyshev's inequality can be used instead of Markov's). The obtained statement generalizes Theorem 1.2 described. The quantile-based guarantees of the other algorithms can be converted to additive error guarantees in an analogous way.

Somewhat sharper (asymptotic) bounds can be obtained by using the approximate median algorithm based on linear queries (Lemma 3.2) together with the algorithm for answering linear queries in prior techniques. Specifically, this algorithm can solve the problem given n=O(t√{square root over (k·log(1/ζ)·log(1/β)·log(log(k log(1/ζ))/β))} samples.

4.2 Simple Generalization

A relatively simple and seemingly weak generalization result that shows the output of a differentially private algorithm cannot “overfit” its input dataset will now be described. Namely, if an (ε, δ) differentially private algorithm outputs a function ϕ:

→

on a dataset sϵ

^(m) sampled from

^(m), then the value of ϕ on any element of the dataset is within the (ρ,1−ϕ)-quantile interval of ϕ(

) with probability at least 1−(2e^(ε)ρ+δ). To obtain meaningful guarantees about the whole dataset from such generalization result, p must be relatively small (much smaller than the desired ¼). The good news is that for an estimator that is well-concentrated around its mean, even values within (ρ,1−φ-quantile interval for small p are close to the mean. Note that, in principle, any estimator can be amplified by sampling and taking a median before being used in this analysis and hence generalization guarantees can be obtained from such relatively simple analysis even in the general case (although the algorithm in this case would need to use two median steps).

Theorem 4.5 Let M:

^(m)→

_([0,1]) be a (ε, δ)-differentially private algorithm with

_([0,1]) being the set of functions ϕ:

→[0,1]. Let

be a distribution on

. Then for all iϵ[m],

${\Pr\limits_{{S\sim\mathcal{D}^{m}}{\phi\sim{M{(S)}}}}\left\lbrack {{\phi\left( S_{i} \right)} \notin {{qi}_{\phi{(\mathcal{D})}}\left( {\rho,{1 - \rho}} \right)}} \right\rbrack} \leq {{2\rho\; e^{ɛ}} + \delta}$

By differential privacy, for all iϵ[m]

$\begin{matrix} {{\Pr\limits_{{S\sim\mathcal{D}^{m}}{\phi\sim{M{(S)}}}}\left\lbrack {{\phi\left( S_{i} \right)} \notin {{qi}_{\phi{(\mathcal{D})}}\left( {\rho,{1 - \rho}} \right)}} \right\rbrack} \leq {{e^{ɛ}{\Pr\limits_{{{{({S,Z})}\sim\mathcal{D}^{m}} \times \mathcal{D}}{\phi\sim{M{({S_{- i},Z})}}}}\left\lbrack {{\phi\left( S_{i} \right)} \notin {{qi}_{\phi{(\mathcal{D})}}\left( {\rho,{1 - \rho}} \right)}} \right\rbrack}} +}} \\ {= {{e^{ɛ}{\Pr\limits_{{{{({S,Z})}\sim\mathcal{D}^{m}} \times \mathcal{D}}{\phi\sim{M{(S)}}}}\left\lbrack {{\phi(Z)} \notin {{qi}_{\phi{(\mathcal{D})}}\left( {\rho,{1 - \rho}} \right)}} \right\rbrack}} +}} \\ {{\leq {{e^{ɛ}2\rho} + \delta}},} \end{matrix}$ where the equalities follow from the fact that the pairs (S, Z) and ((S_(−i), Z), Z_(i)) are identically distributed and the definition of the (ρ,1−φ-quantile interval.

Now for ρ and δ that are sufficiently small, Theorem 4.5 ensures that with probability at least 1−β, for all iϵ[m], φ(s_(i))ϵ

)(ρ, 1−φ. This means that to get a value in

(ρ,1−φ, an algorithm that outputs a value that is in between the smallest and the largest values of ϕ on the elements of a dataset s may be used. Such value is referred to as an interior point of ϕ(s) (and is equivalent to a 1-approximate median). This argument gives the following theorem.

Theorem 4.6: For any βϵ(0,1), t, kϵ

, a finite set T⊂

and

=X^(t), and with

${n \geq n_{0}} = {O\left( {t \cdot \sqrt{k} \cdot {\log\left( \frac{T}{\beta} \right)} \cdot {\log^{\frac{1}{2}}\left( \frac{k\;{\log\left( {T} \right)}}{\beta} \right)}} \right)}$ there exists an interactive algorithm M that takes as input a dataset sϵX^(n) and provides answers v₁, . . . , v_(k)ϵT to adaptively-chosen queries ϕ₁, . . . , ϕ_(k):X^(t)→T such that, for all interactive algorithms A and distributions

on X,

${{\underset{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})} \sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S \sim \mathcal{P}^{n}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack v_{j}} \in {{qi}_{\phi_{j}{(\mathcal{P}^{t})}}\left( {\rho,{1 - \rho}} \right)}}} \right\rbrack} \geq {1 - \beta}},{{{where}\mspace{14mu}\rho} = {{\beta \cdot \frac{t}{4{kn}}} = {{\overset{\sim}{\Omega}\left( \frac{\beta}{{k^{\frac{3}{2}} \cdot \log}{T}} \right)}.}}}$

The algorithm for answering adaptive queries above is used, but with 1-approximate median, instead of ¼. As in the proof of Theorem 1.3,

≐X^(t) and

=

^(t). Theorem 3.1 says that if m≥4 ln(2k|T|/β)/{tilde over (ε)}, then each execution of the median algorithm is ({tilde over (ε)}, 0)-differentially private for every input query ϕ_(j):

→T_(j). This implies that for all interactive algorithms A and every sϵ

^(m),

$\begin{matrix} {{\Pr\limits_{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})}\sim A}\rightleftarrows{M{(s)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack\mspace{20mu} v_{j}} \in {{qi}_{\phi_{j}{(s)}}\left( {0,1} \right)}}} \right\rbrack} \geq {1 - {\frac{\beta}{2}.}}} & (7) \end{matrix}$

The interactive composition (Theorem 2.5) implies that M is (ε, δ)-differentially private for any δϵ(0,1) and

$ɛ = {{\frac{k}{2}\left( \frac{4{\ln\left( \frac{2{T}}{\beta} \right)}}{m} \right)} + {\frac{4{\ln\left( \frac{2{T}}{\beta} \right)}}{m}{\sqrt{2k\;{\ln\left( \frac{1}{\delta} \right)}}.}}}$

Now applying Theorem 4.5 and a union bound:

${\Pr\limits_{{S\sim\mathcal{D}^{m}}{{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})}\sim A}\rightleftarrows{M{(S)}}}}\left\lbrack {{\exists{j \in \lbrack k\rbrack}},{i \in {\lbrack m\rbrack\mspace{14mu}{\phi_{j}\left( S_{i} \right)}} \notin {{qi}_{{\phi j}{(\mathcal{D})}}\left( {\rho,{1 - \rho}} \right)}}} \right\rbrack} \leq {{{km}\left( {{e^{ɛ}2\rho} + \delta} \right)}.}$

Combining this with (7):

${\Pr\limits_{{{S\sim\mathcal{D}^{m}}{{({\phi_{\lbrack k\rbrack},v_{\lbrack k\rbrack}})}\sim A}}\rightleftarrows{M{(S)}}}\left\lbrack {\forall{j \in {\lbrack k\rbrack\mspace{14mu} v_{j}} \in {{qi}_{\phi\;{j{(\mathcal{D})}}}\left( {\rho,{1 - \rho}} \right)}}} \right\rbrack} \geq {1 - \frac{\beta}{2} - {{{km}\left( {{e^{ɛ}2\rho} + \delta} \right)}.}}$ Setting m=8 log(2|T|/β)√{square root over (2k ln(1/δ))} ensures that √≤ln 2. Hence for δ=β/(10 km) and ρ=β/(10 km) it is obtained that km(e^(ε)2ρ+δ)≤β/2.

For example, if each ϕ_(j) is (1/√{square root over (t)})-subgaussian with the mean

^(t)[ϕ_(j)]ϵ[−1,1] then for every α>0, setting t=Õ(log(k/β)/α²) ensures that

(ρ, 1−ρ)⊆[

^(t)[ϕ_(j)]−α,

^(t)[ϕ_(j)]+α]. This implies that the means can be estimated with accuracy α given Õ(√{square root over (k)}·log²(1/β)/α²) samples. Note that low-sensitivity queries are (1/√{square root over (t)})-subgaussian and therefore the sample complexity of the present algorithm given by this simple analysis is comparable to the best known for this problem.

As pointed out above, this analysis can also be used to deal with general estimators by adding an additional amplification step. Namely, computing the estimator on several independent subsamples and taking (the exact) median. The resulting algorithm would have sample complexity that is identical to that obtained in Theorem 4.3 up to an additional logarithmic factor (which can be removed with careful calibration of parameters).

5. Dealing with a Large Number of Queries

In this section ways to use the approach described herein when the number of queries that needs to be answered is (relatively) large are described. Namely, an algorithm for answering verification queries and an algorithm whose complexity scales as log k, rather than √{square root over (k)} is provided.

5.1 Verification Queries

Another application of techniques from differential privacy given by prior art techniques is an algorithm that given a statistical query and a proposed estimate of the expectation of this query, verifies the estimate. This problem requires less data if most proposed answers are correct. Specifically, the number of samples needed by this algorithm is (just) logarithmic in the number of queries k but also scales linearly in √{square root over (l)}, where l is the number of queries that fail the verification step. This result is extended to low-sensitivity queries using these results also based upon prior art techniques. In addition, prior art techniques describe a query verification algorithm that can handle arbitrary queries (not just real-valued), which however has sample complexity with linear dependence on l. Its analysis is based on a simple description length-based argument.

A natural way to apply such algorithms is the reusable holdout technique. In this technique the dataset is split into two disjoint parts: the “training” set s_(t) and the holdout set s_(h). The analyst then uses the training set to answer queries and perform other arbitrary analyses. The holdout set is used solely to check whether the answers that were obtained on the training set generalize. Another application is an algorithm referred to as Effective Rounds. This algorithm splits the dataset into several disjoint subsets and at each time uses only one of the subsets to answer queries. An algorithm for verifying answers to queries is used to switch to a new subset of samples whenever a query fails the verification step (and uses its own subset of samples).

Here, an algorithm for verifying answers to queries about general estimators is described. Formally, the algorithm satisfies the following guarantees.

Theorem 5.1 Fix ρ>α>0, β>0, l, t, kϵ

, and n≥n₀=O(t√{square root over (l log(1/αβ))} log(k/β)ρ/α²). There exists an interactive algorithm M that takes as input sϵX^(n) and provides answers a₁, . . . , a_(k)ϵ{Y, N, ⊥} to adaptively-chosen queries (ϕ₁,v₁), . . . , (ϕ_(k),v_(k)) (where ϕ_(j):X^(t)→

and v_(j)ϵ

for all jϵ[k]) satisfying the following: for all interactive algorithms A and distributions

over X,

${\Pr\limits_{{S\sim{\mathcal{P}^{n}({\phi_{\lbrack k\rbrack},{v_{\lbrack k\rbrack}a_{\lbrack k\rbrack}}})}\sim A}\rightleftarrows{M{(S)}}}\quad}{\quad{\left\lbrack {\forall{j \in {\lbrack k\rbrack\begin{matrix} {v_{j} \in {{qi}_{\phi_{j}{(\mathcal{P}^{i})}}\left( {\rho,{1 - \rho}} \right)}} & \Longrightarrow & {a_{j} \in \left\{ {Y,\bot} \right\}} \\ {\mspace{14mu}{v_{j} \notin {{qi}_{\phi_{j}{(\mathcal{P}^{i})}}\left( {{\rho - \alpha},{1 - \rho + \alpha}} \right)}}} & \Longrightarrow & {a_{j} \in \left\{ {N,\bot} \right\}} \\ {{\left\{ {{{j^{\prime} \in \left\lbrack {j - 1} \right\rbrack}:a_{j^{\prime}}} = N} \right\} } = \ell} & \Longleftrightarrow & {a_{j} = \bot} \end{matrix}}}} \right\rbrack \geq {1 - {\beta.}}}}$

First, the accuracy promise of this algorithm is described. Each query is specified by a function ϕ_(j):X^(t)→

as well as a “guess” v_(j)ϵ

. The guess is “good” if v_(j)ϵ

(ρ,1−ρ) and “bad” if v_(j)ϵ

(ρ−α,1−ρ+α). Essentially, the guarantee is that, if the guess is good, the algorithm answers Y and, if the guess is bad, the algorithm answers N. However, there are two caveats to this guarantee—(i) if the guess is neither good nor bad, then the algorithm may output either Y or N and, —(ii) once the algorithm has given the answer N to l queries, its failure budget is “exhausted” and it only outputs ⊥.

Note that this algorithm handles only the verification and does not provide correct answers to queries that failed the verification step. To obtain correct responses one can run an instance of the query-answering algorithm from Theorem 1.3 in parallel with the verification algorithm. The query-answering algorithm would be used only l times and hence the dataset size it would require would be independent of k and scale linearly in √{square root over (l)}. (The two algorithms can either be run on disjoint subsets of data or on the same dataset since differential privacy composes.)

The proof is a reduction of the verification step to verification of answers to statistical queries (relative to

^(t)). Hence the results may be directed applied from prior approaches to analyze the present algorithm. However, as mentioned above, for small values of ρ, the existing algorithm has suboptimal dependence of sample complexity on ρ and α. Specifically, the dependence is 1/α² instead of ρ/α² which, in particular, is quadratically worse for the typical setting of α=Θ(ρ). Note that the dataset size grows with l—the number of times that “No” is returned to a verification query. Therefore choosing a small ρ is useful for ensuring that “No” is returned only when overfitting is substantial enough to require correction.

To improve this dependence the sharper generalization result is used (Theorem 4.2). But first, the stability properties of the sparse vector technique that are the basis of this algorithm.

Theorem 5.2 For all α, β, ε, δ>0, m, k, lϵ

with

${{m \geq m_{0}} = {O\left( \frac{\sqrt{{\ell log}\left( \frac{1}{\delta} \right)}{\log\left( \frac{k}{\beta} \right)}}{ɛ\alpha} \right)}},$ there exists an interactive (ε, δ)-differentially private algorithm {tilde over (M)} that takes as input sϵ

^(m) and provides answers b₁, . . . , b_(k)ϵ{Y, N, ⊥} to adaptively chosen queries (ψ₁, u₁), . . . , (ψ_(k), u_(k)) (where ψ_(j):

→

and u_(j)ϵ

for all jϵ[k]) with the following accuracy guarantee. For all interactive algorithms A and all sϵ

^(m)

${\Pr\limits_{{{({\psi_{\lbrack k\rbrack},{u_{\lbrack k\rbrack}b_{\lbrack k\rbrack}}})}\sim A}\rightleftarrows{\hat{M}{(s)}}}\quad}{\quad{\left\lbrack {\forall{j \in {\lbrack k\rbrack\begin{matrix} {{s\left\lbrack \psi_{j} \right\rbrack} > u_{j}} & \Longrightarrow & {b_{j} \in \left\{ {Y,\bot} \right\}} \\ {{s\left\lbrack \psi_{j} \right\rbrack} \leq {u_{j} - \alpha}} & \Longrightarrow & {b_{j} \in \left\{ {N,\bot} \right\}} \\ {{\left\{ {{{j^{\prime} \in \left\lbrack {j - 1} \right\rbrack}:b_{j^{\prime}}} = N} \right\} } = \ell} & \Longleftrightarrow & {b_{j} = \bot} \end{matrix}}}} \right\rbrack \geq {1 - {\beta.}}}}$

Proof [of Theorem 5.1]: As before,

≐X^(t),

≐

^(t) and the input dataset is viewed as an element of

^(m) sampled from

^(m).

The sparse vector algorithm of Theorem 5.2 is used. Theorem 4.1 is used to convert the empirical guarantee into a guarantee relative to the data distribution, as in Theorem 4.2. However, every verification query is converted into two statistical queries to check the two “ends” of the quantile interval. That is, given a verification query (ϕ_(j), v_(j)) for which it is desirable to know whether v_(j)ϵ

(ρ, 1−ρ) or v_(j)ϵ

(Σ−α,1−ρ+α), two statistical queries ψ_(2j-1) and ψ_(2j) are presented for which it is desirable to know if

[ϕ]>ρ or D[ψ]<ρ−α (with ψϵ{ψ_(2j-1), ψ_(2j)}). Formally, there is the following reduction.

The sparse vector algorithm {tilde over (M)} of Theorem 5.2 is converted into an algorithm M of the desired form of Theorem 5.1: Each query (ϕ_(j), v_(j)) to M is converted into two queries (ψ_(2j-1), u_(2j-1)) and (ψ_(2j), u_(2j)) to {tilde over (M)}, where

${{\psi_{{2j} - 1}(z)} = {1\left( {{\phi_{j}(x)} \leq v_{j}} \right)}},{{\psi_{{2j} - 1}(z)} = {1\left( {{\phi_{j}(x)} \geq v_{j}} \right)}},{u_{{2j} - 1} = {u_{2j} = {\rho - {\frac{\alpha}{3}.}}}}$

These queries have the following key property: (†) If v_(j)ϵ

(ρ, 1−ρ), then

[ψ_(2j-1)]>ρ and

[ψ_(2j)]>ρ. If v_(j)ϵ

(ρ−α,1−ρ+α), then either

[ψ_(2j-1)]≤ρ−α or

[ψ_(2j)]≤ρ−α (but not both). Let b_(2j-1) and b_(2j) be the answers produced by {tilde over (M)} to (ψ_(2j-1), u_(2j-1)) and (ψ_(2j), u_(2j)) respectively. If b_(2j-1)=b_(2j)=Y, then M returns a_(j)=Y. If b_(2j-1)=⊥ or b_(2j)=⊥ (or both), then M returns a_(j)=⊥. Otherwise M returns a_(j)=N.

Note that {tilde over (M)} must answer twice as many queries as M; thus {tilde over (M)} must be instantiated with the value k being twice as large as for M. {tilde over (M)} is also instantiated with a reduced by a factor of 3 and β reduced by a factor of 2. The values ε and δ used by {tilde over (M)} will be determined later in this proof.

In particular, {tilde over (M)} is instantiated to achieve the following accuracy guarantee. For all interactive algorithms A and all sϵ

^(m)

${\Pr\limits_{{{({\psi_{\lbrack k\rbrack},{u_{\lbrack k\rbrack}b_{\lbrack k\rbrack}}})}\sim A}\rightleftarrows{\hat{M}{(s)}}}\quad}{\quad{\left\lbrack {\forall{j \in {\lbrack k\rbrack\begin{matrix} {{s\left\lbrack \psi_{j} \right\rbrack} > u_{j}} & \Longrightarrow & {b_{j} \in \left\{ {Y,\bot} \right\}} \\ {{s\left\lbrack \psi_{j} \right\rbrack} \leq {u_{j} - {\alpha/3}}} & \Longrightarrow & {b_{j} \in \left\{ {N,\bot} \right\}} \\ {{\left\{ {{{j^{\prime} \in \left\lbrack {j - 1} \right\rbrack}:b_{j^{\prime}}} = N} \right\} } = \ell} & \Longleftrightarrow & {b_{j} = \bot} \end{matrix}}}} \right\rbrack \geq {1 - {\frac{\beta}{2}.}}}}$

Now is will be shown that M satisfies the promised accuracy requirement relative to the distribution

rather than relative to the empirical values. Given the key property (†) above, it suffices to show that, with probability at least 1−β/2 over a random choice of S˜

m, for all jϵ[2k] and (ψ_([k]), u_([k]), b_([k]))˜A⇄{tilde over (M)} (S), so that

[ψ_(j)]ρ⇒S[ψ_(j)]>u _(j)=ρ−α/3 and

[ψ_(j)]ρ−α⇒S[ψ_(j)]≤u _(j)−α/3=ρ−2α/3.  (8)

Furthermore, to prove (8), it suffices to have

${{{{\mathcal{D}\left\lbrack \psi_{j} \right\rbrack} \cdot \frac{\rho - \frac{\alpha}{4}}{\rho}} - \frac{\alpha}{12}} \leq {S\left\lbrack \psi_{j} \right\rbrack} \leq {{{\mathcal{D}\left\lbrack \psi_{j} \right\rbrack} \cdot \frac{\rho - \frac{3\alpha}{4}}{\rho - \alpha}} + \frac{\alpha}{12}}},$

which is, in turn, implied by

${{{S\left\lbrack \psi_{j} \right\rbrack} - {\mathcal{D}\left\lbrack \psi_{j} \right\rbrack}}} \leq {{\frac{\alpha}{4\rho} \cdot {\mathcal{D}\left\lbrack \psi_{j} \right\rbrack}} + {\frac{\alpha}{12}.}}$

Theorem 4.1 is now used to prove that (9) holds simultaneously for all jϵ[2k] with probability at least 1−β/2, as required to complete the proof. First, define f:

_({0,1}) ^(2k)×

^(2k)×{Y, N, ⊥}^(2k)→

_({0,1}) ^(4k) by f(ψ, u, b)=(ψ₁, 1−ψ₁, ψ₂, 1−ψ₂, . . . , ψ_(2k), 1−ψ_(2k)). By post-processing (Theorem 2.3), f (A⇄{tilde over (M)} (s)), is an (ε, δ)-differentially private function of sϵ

^(m) for all interactive algorithms A. The output of f (A⇄M (s)), is 4k functions mapping

to {0,1}. Set

$ɛ = {\frac{1}{2}{\ln\left( {1 + \frac{\alpha}{8\rho}} \right)}}$ and δ=αβ/(16·2·12).

Suppose

$m \geq {\frac{8 \cdot 12}{ɛ\alpha}{{\ln\left( {16{k/\beta}} \right)}.}}$ By theorem 4.1,

$\begin{matrix} {{\underset{\hat{\psi}\sim{f{({A\rightleftarrows{M{(S)}}})}}}{\Pr\limits_{S\sim\mathcal{D}^{m}}}\left\lbrack {\forall{j \in {\left\lbrack {2k} \right\rbrack\begin{matrix} {{{S\left\lbrack \psi_{j} \right\rbrack} - {\mathcal{D}\left\lbrack \psi_{j} \right\rbrack}} \leq {\frac{\alpha}{12} + {\frac{\alpha}{S_{\rho}} \cdot {{mad}\left( {\psi_{j}(\mathcal{D})} \right)}}}} \\ {{{S\left\lbrack {1 - \psi_{j}} \right\rbrack} - {\mathcal{D}\left\lbrack {1 - \psi_{j}} \right\rbrack}} \leq {\frac{\alpha}{12} + {\frac{\alpha}{8_{\rho}} \cdot {{mad}\left( {\psi_{j}(\mathcal{D})} \right)}}}} \end{matrix}}}} \right\rbrack} \geq {1 - {\frac{\beta}{2}.}}} & (10) \end{matrix}$

Note that max{S[ψ_(j)]−

[ψ_(j)], S[1−ψ_(j)]−

[1−ψ_(j)]}=|S[ψ_(j)]−

[ψ_(j)]| and mad of ψ_(j) is equal to mad of 1−ψ_(j). Since mad(ψ_(j)(D))≤2·

[ψ_(j)], the generalization bound (10) implies the desired bound (9) holds simultaneously for all jϵ[2k] with probability at least 1−β/2, as required.

It only remains to work out the parameters. Thus, ε≥α/18ρ. Theorem 4.1 requires m≥m₁ where

${m_{1} = {{\frac{8 \cdot 12}{ɛ\alpha}{\ln\left( {16k\text{/}\beta} \right)}} \leq {{8 \cdot 12 \cdot 18}\;\frac{\rho}{\alpha^{2}}{\ln\left( {16k\text{/}\beta} \right)}}}},$ while Theorem 5.2 requires

${m \geq m_{0}} = {{O\left( \frac{\sqrt{\ell\;{\log\left( \frac{1}{\delta} \right)}}{\log\left( \frac{k}{\beta} \right)}}{ɛ\alpha} \right)} = {{O\left( \frac{\sqrt{\ell\;{\log\left( \frac{1}{\alpha\beta} \right)}}{\log\left( \frac{k}{\beta} \right)}\rho}{\alpha^{2}} \right)}.}}$ Thus the final sample complexity is max{m₀, m₁}, as required.

5.2 Private Multiplicative Weights

A result in which the dependence of the required dataset size on the number of queries k is logarithmic (at the expense of some additional terms and computational efficiency) is now described. It is known that in this general setting, the dependence on the data universe size and the loss of computational efficiency are unavoidable.

The present result follows from a direct combination of an algorithm for answering statistical queries and the reduction from the approximate median problem to the problem of answering statistical queries relative to distribution

=

^(t) (given in Lemma 3.2). Specifically, the following result that is based on the private multiplicative weights algorithm of prior approaches.

Theorem 5.3 For all α, βϵ(0,1) and m, kϵ

with

${{m \geq m_{0}} = {O\left( {{\sqrt{\log{\mathcal{Z}}} \cdot \log}\;{k \cdot \frac{\log^{\frac{3}{2}}\left( \frac{1}{\alpha\beta} \right)}{\alpha^{3}}}} \right)}},$ there exists an interactive algorithm M that takes as input a dataset sϵ

^(m) and provides answers v₁, . . . , v_(k)ϵ[−1,1] to adaptively-chosen queries ψ₁, . . . , ψ_(k):

→[−1,1] such that, for all interactive algorithms A and distributions

over

,

${\underset{{{({\psi_{\lbrack k\rbrack},\upsilon_{\lbrack k\rbrack}})}\sim A}\rightleftarrows{M{(s)}}}{\Pr\limits_{S\sim\mathcal{D}^{m}}}\left\lbrack {{\forall{j \in \lbrack k\rbrack}}❘{{v_{j} - {\mathcal{D}\left\lbrack {\psi_{j}(\mathcal{D})} \right\rbrack}} \leq \alpha}} \right\rbrack} \geq {1 - {\beta.}}$

Now, by Lemma 3.2, for

=X^(t) and

=

^(t) and any query ϕ:

→T, responses to 2└ log₂|T|┘ statistical queries relative to

with accuracy ⅛ can be used to find a value vϵqi_(ϕ()

₎(¼,¾). By plugging this reduction into Theorem 5.3 the following result is obtained

Theorem 5.4 For any βϵ(0,1), t, kϵ

, a finite set T⊆

and

=X^(t) and with

${n \geq n_{0}} = {O\left( {t^{\frac{3}{2}} \cdot \sqrt{\log{\mathcal{X}}} \cdot {\log\left( \left. {k\;\log} \middle| T \right| \right)} \cdot {\log^{\frac{3}{2}}\left( \frac{1}{\beta} \right)}} \right)}$ there exists an interactive algorithm M that takes as input a dataset sϵ

^(n) and provides answers v₁, . . . , v_(k)ϵT to adaptively-chosen queries ϕ₁, . . . , ϕ_(k):X^(t)→T such that, for all interactive algorithms A and distributions

over X,

${\underset{{{({\phi_{\lbrack k\rbrack},\upsilon_{\lbrack k\rbrack}})}\sim A}\rightleftarrows{M{(S)}}}{\Pr\limits_{S\sim P^{m}}}{\left\lbrack {\forall{j \in {\lbrack k\rbrack\upsilon_{j}} \in {{qi}_{\phi_{j}{(\mathcal{P}^{t})}}\left( {\frac{1}{4},\frac{3}{4}} \right)}}} \right\rbrack}} \geq {1 - {\beta.}}$

For example, this algorithm may be used to obtain a new algorithm for answering a large number of low-sensitivity queries (that is queries ϕ:X^(t)→[−1,1] such that Δ(ϕ)=1/t). To answer queries with accuracy α t=16/α² can be used and set T that is the interval [−1,1] discretized with step α/2. Thus the number of samples that the present algorithm uses is n=O(√{square root over (log|X|)}·log(k/α)·log^(3/2)(1/β)/α³). For comparison, the best previously known algorithm for this problem uses

$n = {O\left( {\log{{\mathcal{X}} \cdot {\log\left( \frac{k}{\alpha} \right)} \cdot \frac{\log^{\frac{3}{2}}\left( \frac{1}{\beta} \right)}{\alpha^{4}}}} \right)}$ Although, as pointed out herein, the setting in which each query is applied to the entire dataset is more general than the present dataset.

The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.

Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.

Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.

These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks. The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.

While several embodiments have been described herein, it will be appreciated that elements from any given embodiment may be used with any one or more elements from any one or more of other embodiments described herein. Moreover, the descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. 

What is claimed is:
 1. A computer system comprising: a hardware processor and a memory coupled thereto, the memory comprising a database, the hardware processor configured to automatically: randomly split the database into a plurality of sub-databases; apply a database query to the plurality of sub-databases; generate a plurality of respective estimated query response values for each sub-database based upon applying the database query; calculate a median of the estimated query response values; generate a probability distribution based upon the estimated query response values and the calculated median, wherein the processor is configured to generate the probability distribution so that the probability distribution at any point is given by $\frac{P}{e^{{- \epsilon}\; l}}$ wherein P is the probability distribution, ϵ is a predetermined parameter, and/is a number of points between a given estimated query response value and the median; and select a final estimated query response value based upon the probability distribution.
 2. The computer system of claim 1, wherein the hardware processor is configured to generate the probability distribution by at least weighting the plurality of estimated query response values based upon proximity to the calculated median; and wherein the processor is configured to select the final estimated query response by at least selecting one of the weighted plurality of respective estimated query response values based upon the weighting as the final estimated query response.
 3. The computer system of claim 2, wherein the hardware processor is configured to generate the probability distribution by at least sampling each of the plurality of estimated query response values based upon e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|) wherein ϵ is a predetermined parameter, a_(v) is a number of the estimated query response values greater than the selected estimated query response value, and b_(v) is a number of the estimated query response values less than the selected estimated query response value.
 4. The computer system of claim 3, wherein each of the plurality of estimated query response values is sampled from a set of possible query response values proportional to e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|).
 5. The computer system of claim 3, wherein the hardware processor is configured to determine the pre-determined parameter ϵ according to $\epsilon = \frac{{\log_{e}{T}} + 6}{m}$ wherein T is a set of possible query response values and m is a random disjoint subset of n samples divided by t subsamples.
 6. The computer system of claim 1, wherein the database comprises a medical database that includes medical data for patients.
 7. The computer system of claim 1, wherein the database comprises a machine learning database.
 8. A computer-implemented method for estimating a response to a database query, the method comprising automatically: randomly splitting the database into a plurality of sub-databases; applying a database query to the plurality of sub-databases; generating a plurality of respective estimated query response values for each sub-database based upon applying the database query; calculating a median of the estimated query response values; generating a probability distribution based upon the estimated query response values and the calculated median, wherein the processor is configured to generate the probability distribution so that the probability distribution at any point is given by $\frac{P}{e^{{- \epsilon}\; l}}$ wherein P is the probability distribution, ϵ is a predetermined parameter, and l is a number of points between a given estimated query response value and the median; and selecting a final estimated query response value based upon the probability distribution.
 9. The computer-implemented method of claim 8, wherein generating the probability distribution comprises weighting the plurality of estimated query response values based upon proximity to the calculated median; and wherein selecting a final estimate query response comprises selecting one of the weighted plurality of respective estimated query response values based upon the weighting as the final estimated query response.
 10. The computer-implemented method of claim 9, wherein the probability distribution is generated by at least sampling each of the plurality of estimated query response values based upon e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|) wherein ϵ is a predetermined parameter, a_(v) is a number of the estimated query response values greater than the selected estimated query response value, and b_(v) is a number of the estimated query response values less than the selected estimated query response value.
 11. The computer-implemented method of claim 10, wherein each of the plurality of estimated query response values is sampled from a set of possible query response values proportional to e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|).
 12. The computer-implemented method of claim 10, wherein the predetermined value of ϵ is determined according to $\epsilon = \frac{{\log_{e}{T}} + 6}{m}$ wherein T is a set of possible query response values and m is a random disjoint subset of n samples divided by t subsamples.
 13. A computer-readable medium for estimating a response to a database query, the computer-readable medium comprising computer-executable instructions that when executed by a hardware processor cause the hardware processor to automatically perform operations comprising: randomly splitting the database into a plurality of sub-databases; applying a database query to the plurality of sub-databases; generating a plurality of respective estimated query response values for each sub-database based upon applying the database query; calculating a median of the estimated query response values; generating a probability distribution based upon the estimated query response values and the calculated median, wherein the processor is configured to generate the probability distribution so that the probability distribution at any point is given by $\frac{P}{e^{{- \epsilon}\; l}}$ wherein P is we probability distribution, ϵ is a predetermined parameter, and l is a number of points between a given estimated query response value and the median; and selecting a final estimated query response value based upon the probability distribution.
 14. The computer-readable medium of claim 13, wherein generating the probability distribution comprises weighting the plurality of estimated query response values based upon proximity to the calculated median; and wherein selecting a final estimate query response comprises selecting one of the weighted plurality of respective estimated query response values based upon the weighting as the final estimated query response.
 15. The computer-readable medium of claim 14, wherein the probability distribution is generated by at least sampling each of the plurality of estimated query response values based upon e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|) wherein ϵ is a predetermined parameter, a_(v) is a number of the estimated query response values greater than the selected estimated query response value, and b_(v) is a number of the estimated query response values less than the selected estimated query response value.
 16. The computer-readable medium of claim 15, wherein each of the plurality of estimated query response values is sampled from a set of possible query response values proportional to e^(−ϵ|a) ^(v) ^(−b) ^(v) ^(|).
 17. The computer-readable medium of claim 15, wherein the predetermined value of ϵ is determined according to $\epsilon = \frac{{\log_{e}{T}} + 6}{m}$ wherein T is a set of possible query response values and m is a random disjoint subset of n samples divided by t subsamples. 